"""
码号基础schema
"""

from datetime import datetime

from pydantic import BaseModel

from forward.extend.pydantic.base import BaseSchema
from forward.utils.tools import ToolsUtil


class CodeSchema(BaseSchema):
    """
    码号基础模型
    """

    prefix: str
    code: str
    code_id: int
    status: int
    activity_id: int | None = None
    prize_id: int | None = None
    prize_index: int | None = None
    created_time: datetime | None = None


class CodeOutSchema(CodeSchema):
    """
    码号model 返回
    """

    id: int


class CodeCreateSchema(CodeSchema):
    """
    码号model 创建
    """

    pass


class CodeUpdateSchema(CodeSchema):
    """
    码号model 更新
    """

    pass
